package spec.lijunyao.unit4.clazz.inherit2;

public class Student {
    String xm;
    String xh;
    String xx;

    /**
     * 无参数的构造方法也称为默认构造方法
     */
    public Student() {
        System.out.println("Student类的默认构造方法运行了！");
    }

    public Student(String xh, String xm, String xx){
        this.xh = xh;
        this.xm = xm;
        this.xx = xx;
        System.out.println("Student类的带参数的构造方法运行了！");
    }

    String study(){
        return "学习使我快乐";
    }


}